%% File Name: chGraph
%% Author: Anung B. Ariwibowo
%% History:
%%  2002.11.20: Start writing a template

\chapter{Graf} \label{ch:graph}

\section{Istilah-istilah dalam Graf} \label{sect:terminologi}

\section{Representasi Graf} \label{sect:representasi-graf}

\section{Algoritma-algoritma Graf}

\subsection{Breadth-First Search} \label{subsect:bfs}

  \begin{algorithmic}[1]
    \STATE \textsc{BFS \( (G, s) \)}
    \FOR{ setiap verteks \(u \in V[G] - \{s\} \) }
      \STATE \emph{color}\([u] \leftarrow \) \textsc{WHITE}
      \STATE \( d[u] \leftarrow \infty \)
      \STATE \( \pi[u] \leftarrow \) \textsc{NIL}
    \ENDFOR
    \STATE \emph{color}\([s] \leftarrow \) \textsc{GRAY}
    \STATE \(d[s] \leftarrow 0\)
    \STATE \( \pi[s] \leftarrow \) \textsc{NIL}
    \STATE \( Q \leftarrow \{s\} \)
    \WHILE{ \( Q \neq \emptyset \) }
      \STATE \( u \leftarrow \ \mathit{head}[Q] \)
      \FOR{ setiap \(v \in \ \mathit{Adj}[u] \) }
        \IF{ \emph{color}\([u] = \) \textsc{WHITE} }
          \STATE \emph{color}\([v] \leftarrow \) \textsc{GRAY}
          \STATE \( d[v] \leftarrow d[u] + 1 \)
          \STATE \( \pi[v] \leftarrow u \)
          \STATE \textsc{ENQUEUE}\( (Q, v) \)
        \ENDIF
      \ENDFOR
      \STATE \textsc{DEQUEUE}\( (Q) \)
      \STATE \emph{color} \([u] \leftarrow \) \textsc{BLACK}
    \ENDWHILE
  \end{algorithmic}


\subsection{Depth-First Search} \label{subsect:dfs}

\subsection{Mendeteksi keberadaan Cycle dalam Digraph}
\label{subsect:cycle-detection}

\subsection{Minimum Spanning Tree} \label{subsect:mst}

definisi tree

definisi spanning

definisi minimum

Graf yang diolah adalah \emph{weighted graph}

Definisi-definisi: cut, cycle, crossing edge, light edge, dan safe edge.

%\lambda
%\begin{array}[pos]{spalten}
	
%\end{array}
